<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        {{num}}
        <button v-on:click="add()">加</button>
    </div>
    <script src="../node_modules/vue/dist/vue.js"></script>
    <script type="text/javascript">
        var vm = new Vue({
                el:"#app",
                data:{
                   num:"18"
                },
                methods:{
                   add:function () {
                     this.num++;
                   }
                }
            })
    </script>
</body>
</html>